package com.ny.wlw;

public class person2 {
    public String name;
    private  int age;
    public void setAge(int age){
        if (age<0){
            System.out.println("你输入的年龄是不符合规矩，不能为负数");
        }
        else{
            this.age = age;
        }
    }

    public  int getAge(){
        return  age;
    }
    public void play(){
        System.out.println("人类可以继续娱乐活动");
    }
}
